import {
    HTTP
} from '../../../../utils/http.js'
let ajax = new HTTP()
var app = getApp()

Page({
    data: {
        title: '',
        time: '',
        content: '',
    },
    onLoad(options) {
        let nid = options.id
        let memberid = app.globalData.memberid
        this._getApplyList(memberid, nid)
    },
    // 转发 
    onShareAppMessage: function () {

    },
    // 请求列表数据
    _getApplyList(memberid, nid) {
        ajax.request({
            url: "articlelist/read",
            data: {
                memberid: memberid,
                id: nid
            },
            success: (res) => {
                let content = res.data.content
                res.data.content = content.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ')
                this.setData({
                    title: res.data.title,
                    time: res.data.createtime,
                    content: res.data.content,
                    pic: res.data.pic
                })
            }
        })
    },


})